function [ G ] = GM2( A,B,t )
% Alternative function to calculate the geometric mean

N = size(A,1);

Z = zeros(N);
if (A==Z)
   G = Z;
else
if (B==Z)
   G = Z;
else
   G = A*((inv(A)*B)^t);
end

end